Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add reasoning content toggle for assistant messages #2809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dasolhwang wants to merge 1 commit into simstudioai:main
base: main
Choose a base branch
Loading
from dasolhwang:feat/assistant-reasoning-content-toggle

Conversation

@dasolhwang
Copy link

@dasolhwang dasolhwang commented Jan 14, 2026

🎯 Overview

Adds a toggleable reasoning_content field for assistant role messages in the Agent block's messages input component.

✨ Features

  • Added reasoning_content optional field to Message interface
  • Added '+ Reasoning' / 'βˆ’ Reasoning' toggle button for assistant messages
  • Reasoning content field appears/hides based on toggle state
  • Auto-shows reasoning content when existing data contains reasoning_content
  • Full support for variable references, env vars, and all existing features
  • Maintains clean UI by showing field only when needed

🎬 Use Cases

  • o1/o3 models with reasoning capabilities
  • Few-shot learning examples with chain-of-thought
  • Debugging and transparency in agent responses

πŸ“ Implementation Details

Modified File:
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx

Changes:

  • Added reasoning_content?: string to Message interface
  • Added state management for toggle visibility
  • Added toggle button UI for assistant role
  • Added conditional rendering of reasoning content field
  • Auto-initialization when existing data has reasoning_content

Code Statistics:

  • +211 lines added
  • -22 lines removed

βœ… Testing

Tested locally with development server. All existing functionality preserved.

πŸ”— Related

This feature enables better support for reasoning models like OpenAI's o1/o3 series, which separate thinking/reasoning from response content.

greptile-apps[bot] reacted with thumbs up emoji
Add toggleable reasoning_content field for assistant role messages in the Agent block's messages input component.
Features:
- Added reasoning_content optional field to Message interface
- Added '+ Reasoning' / 'βˆ’ Reasoning' toggle button for assistant messages
- Reasoning content field appears/hides based on toggle state
- Auto-shows reasoning content when existing data contains reasoning_content
- Full support for variable references, env vars, and all existing features
- Maintains clean UI by showing field only when needed
This enables users to add reasoning/thinking content separately from the main response content, useful for:
- o1/o3 models with reasoning capabilities
- Few-shot learning examples with chain-of-thought
- Debugging and transparency in agent responses
Copy link

vercel bot commented Jan 14, 2026

Someone is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

greptile-apps bot commented Jan 14, 2026

Greptile Summary

Adds an optional reasoning_content field to the Message interface for assistant messages, enabling support for reasoning-capable models like OpenAI's o1/o3 series.

  • Added reasoning_content?: string to Message interface
  • Implemented toggle button ('+ Reasoning' / 'βˆ’ Reasoning') for assistant role messages
  • Auto-displays reasoning field when existing data contains reasoning_content
  • Reasoning content field has full feature parity with main content field (variable references, env vars, dropdowns, auto-resize)
  • Toggle state preserved in component state, data persisted when field is hidden
  • Clean implementation following existing patterns for message content handling

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation follows established patterns, adds an optional field without breaking changes, includes proper state management, auto-initialization logic, and full feature parity with existing content fields. No logic errors, security issues, or architectural concerns identified.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx Added optional reasoning_content field with toggle UI for assistant messages, supporting o1/o3 reasoning models

Sequence Diagram

sequenceDiagram
 participant User
 participant MessagesInput
 participant State
 participant Message
 User->>MessagesInput: Click "+ Reasoning" button
 MessagesInput->>State: toggleReasoningContent(index)
 State->>State: Update showReasoningContent[index] = true
 MessagesInput->>MessagesInput: Re-render with reasoning field visible
 
 User->>MessagesInput: Enter reasoning content
 MessagesInput->>Message: updateMessageReasoningContent(index, content)
 Message->>Message: Update message.reasoning_content
 Message->>State: setMessages(updatedMessages)
 
 User->>MessagesInput: Click "βˆ’ Reasoning" button
 MessagesInput->>State: toggleReasoningContent(index)
 State->>State: Update showReasoningContent[index] = false
 Note over State,Message: reasoning_content data preserved
 MessagesInput->>MessagesInput: Re-render with reasoning field hidden
Loading

Copy link
Contributor

greptile-apps bot commented Jan 14, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /